package com.yequan.work;

import java.util.Objects;

/**
 * @author yequan
 * @date 2021/09/08 13:58
 **/
public class InitDemo {


    public static void main(String[] args) {
        testInitOthersRideInfo();
    }

    public static void testInitOthersRideInfo() {
        RideMulti rideMulti = new RideMulti();
        RideInterMulti rideInterMulti = new RideInterMulti();
        initOthersRideInfo(false, null, rideMulti);
        initOthersRideInfo(true, rideInterMulti, null);
    }

    public static void initOthersRideInfo(boolean isInterRide, RideInterMulti rideInterMulti, RideMulti rideMulti) {
        if (isInterRide && Objects.nonNull(rideInterMulti)) {
            System.out.println("aaaaaaaaa");
        } else if (!isInterRide && Objects.nonNull(rideMulti)) {
            System.out.println("bbbbbbbbb");
        } else {
            System.out.println("ccccccccc");
        }
    }

}
